package com.zyj.eps.service;

import com.zyj.eps.mapper.GoodsMapper;
import com.zyj.eps.pojo.Goods;
import com.zyj.eps.pojo.Record;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author super
 * @date 2022/4/2 13:42
 */
@Service
public class GoodsServiceImpl implements GoodsService{
    @Autowired
    private GoodsMapper goodsMapper;
    @Override
    public List<Goods> getAllGoods() {
        return goodsMapper.getAllGoods();
    }

    @Override
    public Goods getGoodsByName(String goodsname) {
        return goodsMapper.getGoodsByName(goodsname);
    }

    @Override
    public int updateGoods(Goods goods) {
        return goodsMapper.updateGoods(goods);
    }

    @Override
    public int insertGoodsApplyInfo(int uid, String uname, String goodsname, String recordtime, int num) {
        return goodsMapper.insertGoodsApplyInfo(uid,uname,goodsname,recordtime,num);
    }

    @Override
    public List<Integer> getAllNum() {
        return goodsMapper.getAllNum();
    }

    @Override
    public List<Record> getAllRecordById(int uid) {
        return goodsMapper.getAllRecordById(uid);
    }
}
